Roughly explaining, a conventional method for fabricating a photodetector provided with an avalanche layer comprises the steps of forming a N.sup.+ --Si buried layer on a P--Si substrate, forming a N--Si layer (an avalanche layer), forming a SiGe/Si layer (an absorption layer), and forming a P.sup.+ --Si layer (an electrode layer) by a chemical vapor deposition (CVD) method. According to the latest research made by the present inventors on the photodetector provided with the avalanche layer, the avalanche breakdown voltage is supersensitive for the impurity concentration of the avalanche layer of the photodetector, and it is indispensable to control the impurity concentration with high accuracy in order to stabilize the characteristics of the photodetector. However, the impurity concentration of the epitaxial layer is apt to fluctuate in most cases, and it is extremely desirable to develop a method for forming the avalanche layer of the photodiode, by which the fluctuations of the impurity concentration can be suppressed.